import request from "@/utils/request.js";

// 推荐行业需求
export function recommendCommunity(data) {
	return request.get('circle/recommend_community', data, {
		noAuth: true
	});
}

// 行业社群
export function recommendCircle(data) {
	return request.get('circle/recommend_circle', data, {
		noAuth: true
	});
}

/** 添加编辑人脉圈 */
export function editCircle(data) {
	return request.post('circle/edit_circle', data);
}

/** 查询用户人脉圈 */
export function getUserCircle(id, data) {
	return request.get('circle/get_user_circle/'+id, data);
}

// 我的圈子
export function getUserListCircle(data) {
	return request.get('circle/get_user_list_circle', data);
}

// 人脉圈列表
export function getListCircle(data) {
	return request.get('circle/get_list_circle', data, {
		noAuth: true
	});
}

// 检测用户是否已关注人脉圈
export function getAttentionCircle(id) {
	return request.get('circle/get_attention_circle/'+id);
}


// 检测用户是否进入人脉圈2
export function hasCommunityCircle(data) {
	return request.get('circle/has_community_circle', data);
}

// 获取人脉圈信息
export function getCircle(id, data = {}) {
	return request.get('circle/get_circle/'+id, data, {
		noAuth: true
	});
}

// 获取人脉圈分享海报
export function getCircleSharePosted(id, data = {}) {
	return request.get('circle/get_circle_share_posted/'+id, data, {
		noAuth: true
	});
}

// 获取用户金额
export function circleUserInfo() {
	return request.post('circle/circle_user_info');
}

// 加入免费人脉圈
export function joinCircle(id) {
	return request.post('circle/join_circle/'+id);
}

// 群主创建人脉圈支付
export function payCircle(id, data) {
	return request.post('circle/pay_circle/'+id, data);
}

// 购买人脉圈次数
export function payCircleNumber(data) {
	return request.post('circle/pay_circle_number', data);
}

// 进入平台人脉圈
export function enteringCircle(id) {
	return request.post('circle/entering_circle/'+id);
}

// 获取人脉圈广告价格列表
export function getCircleAdvertisementPriceList(id) {
	return request.get('circle/get_circle_advertisement_price_list/'+id);
}

// 添加人脉圈广告
export function circleAdvertisementEdit(data) {
	return request.post('circle_advertisement/edit', data)
}

// 人脉圈广告列表
export function getCircleAdvertisementList(circle_id) {
	return request.get('circle_advertisement/get_circle_advertisement_list/'+circle_id, {}, {
		noAuth: true
	});
}

export function getSendCommunityCircle(data) {
	return request.get('circle/send_community_circle', data)
}

export function getAddCommunityCircleList(data) {
	return request.get('circle/get_add_community_circle_list', data)
}

//圈子删除推广服务
export function delCirCleCommunity(id, data) {
	return request.post(`circle/del_circLe_community/${id}`, data)
}